public class Code {
    // 哈希思想
    public static void main(String[] args) {
        String str = "aabcc";
        int[] array = new int[126];
        for(int i = 0; i < str.length(); i++){
            char tem = str.charAt(i);
            array[tem]++;
        }
        for(int i = 0;i < str.length();i++){
            char tmp = str.charAt(i);
            if(array[tmp] == 1){
                return tmp;
            }
        }
        return -1;
    }

}
